package com.authine.cloudpivot.ext.enums;

import java.util.Objects;

public enum RegisterStatusEnum {

    /**
     * 登记状态
     *
     */

    PROCESSING(0,"处理中"),
    COMPLETE(1,"已完成");

    public String des;
    public Integer id;

    RegisterStatusEnum(Integer id, String des) {
        this.des = des;
        this.id = id;
    }



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public static RegisterStatusEnum findDesById(Integer id) {
        if (Objects.isNull(id)) {
            return null;
        }
        for (RegisterStatusEnum registerStatusEnum : RegisterStatusEnum.values()) {
            if (Objects.equals(registerStatusEnum.getId(), id)) {
                return registerStatusEnum;
            }
        }
        return null;
    }
}
